package collection;
import java.util.ArrayList;
import java.util.List;

/**
 * @Author: Miyako
 * @Date: 2024-07-13-16:38
 * @Description:sublist
 */
public class ListDemo03 {


    public static void main(String[] args) {
        List<Integer> list = new ArrayList<>();
        for (int i = 0 ; i<10;i++){
            list.add(i);
        }
        System.out.println(list);
        List<Integer> list1 = list.subList(1,9);
        System.out.println(list1);
        int SIZE = list1.size();
        for (Integer i = 1; i<9;i++){
           //list1.clear();
            list1.remove(i);

        }

        System.out.println(list);

    }
}
